package com.gisquest.cloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
@RestController
@EnableTransactionManagement
@MapperScan({"com.gisquest.cloud.dao"})
public class GisquestCloudLoggerApplication extends SpringBootServletInitializer {

  public static void main(String[] args) {
    System.setProperty("es.set.netty.runtime.available.processors", "false");
    SpringApplication.run(GisquestCloudLoggerApplication.class, args);
  }

  @GetMapping({"/interfaceTest"})
  public String interfaceTest() {
    return "hello world!";
  }

  @Override
  protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
    return builder.sources(new Class[]{GisquestCloudLoggerApplication.class});
  }

}
